// Bayesian Network
//   Elvira format 

bnet  "Sistema de Valvulas" { 

// Network Properties

kindofgraph = "directed";
visualprecision = "0.00";
version = 1.0;
default node states = (si , no);

// Variables 

node Valvula1t(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =223;
pos_y =132;
relevance = 7.0;
purpose = "";
num-states = 3;
states = ("V_CERRADA" "V_ABIERTA" "OK");
}

node Valvula2t(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =582;
pos_y =131;
relevance = 7.0;
purpose = "";
num-states = 3;
states = ("V_CERRADA" "V_ABIERTA" "OK");
}

node Valvula3t(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =947;
pos_y =135;
relevance = 7.0;
purpose = "";
num-states = 3;
states = ("V_CERRADA" "V_ABIERTA" "OK");
}

node Valvula1t1(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =228;
pos_y =281;
relevance = 7.0;
purpose = "";
num-states = 3;
states = ("V_CERRADA" "V_ABIERTA" "OK");
}

node Valvula2t1(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =600;
pos_y =278;
relevance = 7.0;
purpose = "";
num-states = 3;
states = ("V_CERRADA" "V_ABIERTA" "OK");
}

node Valvula3t1(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =960;
pos_y =289;
relevance = 7.0;
purpose = "";
num-states = 3;
states = ("V_CERRADA" "V_ABIERTA" "OK");
}

node PermanceAbierta(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =445;
pos_y =449;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("NO" "SI");
}

node PermaneceCerrada(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =808;
pos_y =447;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("NO" "SI");
}

node DistribucionFluido(finite-states) {
kind-of-node = chance;
type-of-variable = finite-states;
pos_x =606;
pos_y =561;
relevance = 7.0;
purpose = "";
num-states = 2;
states = ("INCORRECTO" "CORRECTO");
}

// Links of the associated graph:

link PermanceAbierta DistribucionFluido;

link PermaneceCerrada DistribucionFluido;

link Valvula1t Valvula1t1;

link Valvula1t1 PermanceAbierta;

link Valvula1t1 PermaneceCerrada;

link Valvula2t Valvula2t1;

link Valvula2t1 PermanceAbierta;

link Valvula2t1 PermaneceCerrada;

link Valvula3t Valvula3t1;

link Valvula3t1 PermanceAbierta;

link Valvula3t1 PermaneceCerrada;

//Network Relationships: 

relation Valvula1t { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.0 0.0 1.0 );
}

relation Valvula2t { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.0 0.0 1.0 );
}

relation Valvula3t { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.0 0.0 1.0 );
}

relation Valvula1t1 Valvula1t { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (1.0 0.0 0.001 0.0 1.0 0.002 0.0 0.0 0.997 );
}

relation Valvula2t1 Valvula2t { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (1.0 0.0 0.002 0.0 1.0 0.003 0.0 0.0 0.995 );
}

relation Valvula3t1 Valvula3t { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (1.0 0.0 0.003 0.0 1.0 0.004 0.0 0.0 0.993 );
}

relation PermanceAbierta Valvula1t1 Valvula2t1 Valvula3t1 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 1.0 1.0 1.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 );
}

relation PermaneceCerrada Valvula1t1 Valvula2t1 Valvula3t1 { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 );
}

relation DistribucionFluido PermanceAbierta PermaneceCerrada { 
comment = "";
kind-of-relation = potential;
deterministic=false;
values= table (0.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 );
}

}
